home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
163_01
/
peekc.c
< prev
next >
Wrap
Text File
|
1988-01-30
|
512b
|
16 lines
/*
** get a byte from a specified segment and offset
*/
peekc(seg, offset) int seg; char *offset; {
#asm
MOV BX,[BP]+6 ;get segment
MOV ES,BX
MOV BX,[BP]+4 ;get offset
MOV AL,ES:[BX] ;get the byte into the return code reg
CBW ;sign extend
MOV BX,DS
MOV ES,BX ;restore ES
#endasm
}